package com.myapp.war.beans;

import java.util.concurrent.atomic.AtomicInteger;

public class WarLifebloodBean {

	// 生命值
	private AtomicInteger value = null;

	// 最后修改的时间
	private long lastUpdateTime = System.currentTimeMillis();

	public long getLastUpdateTime() {
		return lastUpdateTime;
	}

	public void setLastUpdateTime(long lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

	public AtomicInteger getValue() {
		return value;
	}

	public void setValue(AtomicInteger value) {
		this.value = value;
	}

	public int update(int down) {
		this.lastUpdateTime = System.currentTimeMillis();
		return value.getAndAdd(down);
	}
}
